<!DOCTYPE html>
<html lang="en" ng-app="lottery">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div ng-controller="ctrl_lottery" id="lottery">
        <div id="step1">
            <button ng-click="start()">开始</button>
        </div>
        <div id="step2" class="hide">
            <div ng-repeat="item in items" id="{{item.id}}" class="item" ng-class="{'active':item.status}">
                {{item.name}}
            </div>
        </div>
        <div id="step3" class="hide top">
            <a href="javascript:void(0)" ng-click="reset()" class=" reset">
                <img src="reset.png" alt="reset" width="50px" height="50px">重新开始
            </a>
            <a href="javascript:void(0)" ng-click="edit()" class="edit">
                <img src="edit.png" alt="edit" width="50px" height="50px">修改奖品
            </a>
            <button class="active">{{result}}</button>
        </div>
        <div id="step4" class="hide top">
            <a href="javascript:void(0)" ng-click="return()" class="reset">
                <img src="return.png" alt="return" height="50px" width="50px">返回
            </a>
            <form ng-submit="add()">
                <input type="text" ng-model="name" required placeholder="名称">
                <input type="submit" class="btn" value="添加">
            </form>
            <ul>
                <li ng-repeat="item in items">
                    <span>{{item.id}}</span>
                    <span class="span">{{item.name}}</span>
                    <a href="javascript:void(0)" ng-click="del(item.id)">删除</a>
                </li>
            </ul>
        </div>
    </div>
</body>
<script src="../../lib/10_angular/angular.js"></script>
<script src="app.js"></script>
</html>